[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+-----------+##############################################################
#+-| SAVE_GETS |-----------------------------------------------+##############
#| +-----------+ Stores information about the READ in progress |##############
#+-------------------------------------------------------------+##############
##############################################################################
##############################################################################
#+--| Summary |------------+##################################################
#| #INCLUDE io.hdr |##################################################
#+-------------------------+##################################################
##############################################################################
##############################################################################
#+--| Syntax |---------------------------+####################################
#| PROCEDURE save_gets PROTOTYPE |####################################
#+---------------------------------------+####################################
##############################################################################
##############################################################################
############+---| Description |---------------------------------+#############
############| The save_gets procedure stores information about |#############
############| the READ in progress so that another set of @... |#############
############| GET ... may be read. This procedure is typically |#############
############| used within a FILTER or VALID function of a READ. |#############
############+---------------------------------------------------+#############
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * Add a customer if number not found. |#########
#########| |#########
#########| PROCEDURE find_customer && called by cust_numb valid |#########
#########| !customer SEEK cust_numb |#########
#########| IF a_eof(customer) |#########
#########| DO save_gets |#########
#########| @ 10,10 SAY "NAME: " GET cust_name |#########
#########| @ 11,10 SAY "ADDR: " GET cust_addr |#########
#########| READ |#########
#########| ENDIF |#########
#########| RETURN .T. |#########
#########| ENDPRO |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * The GET filter clause allows you to program |#########
#########| * context sensitive help. |#########
#########| |#########
#########| FUNCTION UINT key_filter |#########
#########| VARDEF |#########
#########| INT s, k |#########
#########| ENDDEF |#########
#########| |#########
#########| k = lastkey() |#########
#########| IF k = &K_F1 |#########
#########| s = savescrn( 4,10,10,50 ) |#########
#########| fill( 4,10,10,50,"********","",c,d,6) |#########
#########| save_gets() |#########
#########| @ 6,12 SAY "What topic? " GET topic READ |#########
#########| DO help WITH topic |#########
#########| restore_gets |#########
#########| restorescrn( s ) |#########
#########| k = 0 && read ignores 0 |#########
#########| ENDIF |#########
#########| RETURN k |#########
#########| ENDPRO |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also:
restore_area
restore_gets
save_screen
@
GET
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson